<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Sekolah extends CI_Controller {
    private $CI;
    
    function __construct() {
        parent::__construct();

        /* Standard Libraries of codeigniter are required */        
        $this->load->helper('url');
        $this->CI = & get_instance();
        $this->CI->load->library("session");        
        if (($this->CI->session->userdata("db_name") <> "") && ($this->CI->session->userdata("db_name") <> null)) {            
            $this->load->database($this->CI->session->userdata("db_name"));
        }        
    }

    function data_sekolah($db = ""){        
        if ($db <> ""){
            $this->load->database($db);
        }
        $this->load->library('ExCRUD');
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('data_sekolah');
        $crud->set_add(false);
        $crud->set_delete(false);
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

    function data_guru($db = ""){
        if ($db <> ""){
            $this->load->database($db);
        }
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('guru');
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

    function jenjang_pendidikan($db = ""){
        if ($db <> ""){
            $this->load->database($db);
        }
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('jenjang_pendidikan');
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

    function prestasi_siswa($db = ""){
        if ($db <> ""){
            $this->load->database($db);
        }
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('prestasi');
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

    function prestasi_guru($db = ""){
        if ($db <> ""){
            $this->load->database($db);
        }
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('prestasi_guru');
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

    function resume_data_siswa($db = ""){
        if ($db <> ""){
            $this->load->database($db);
        }
        $crud = new ExCRUD();
        $crud->standartCheck();
        $crud->set_theme('datatables');
        $crud->set_table('resume_data_siswa');
        $output = $crud->render();
        $this->load->view('admin_sekolah/view_admin_sekolah',$output);
    }

}



/* End of file main.php */
/* Location: ./application/controllers/main.php */